<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="/public/css/admin/style.css?v=<?php echo time();?>" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="/public/css/admin/layout.css?v=<?php echo time();?>" type="text/css" charset="utf-8" />
<script type="text/javascript" src="/public/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="/public/js/function.js"></script>
<title>后台管理登录 - 蔚园心理</title>
<script type="text/javascript">
$(function(){
    $(".login_btn").click(function(){
        var dom_username = $("input[name=username]");
        var dom_password = $("input[name=password]");
        var username = dom_username.val();
        var password = dom_password.val();
        
        if(username == "" || username == null || username.length == 0) {
            dom_username.focus();
            _alert("请输入用户名");
            return false;
        }
        
        if(password == "" || password == null || password.length == 0) {
            dom_password.focus();
            _alert("请输入密码");
            return false;
        }
        
        var url = "/index.php?c=admin&m=doLogin";
        var data = {username:username,password:password};
        var res = _ajax(url, data);
        if(!res.status) {
            dom_password.val("").focus();
            _alert(res.info);
            return false;
        }else{
            _alert(res.info);
            setTimeout(function(){window.location.href='/index.php?c=admin';},2000);
            return true;
        }
    });
});
</script>
</head>
<body>
    <div class="login">
        <ul>
            <li>帐号：<label><input type="text" name="username" class="ipt_blank" value="" /></label></li>
            <li>密码：<label><input type="password" name="password" class="ipt_blank" value="" /></label></li>
            <li><a href="javascript:void(0)" class="login_btn">登&nbsp;&nbsp;录</a><a class="red alter"></a></li>
        </ul>
    </div>
</body>
</html>